#include <STC89C5xRC.H>
#include "LCD1602.h"
#include "ds1302.h"
#include "delay.h"


unsigned char second,minute;

void main()
{
	ds1302_init();
	//ds1302_writebyte(0x8e,0x00);
	LCD_Init();	
	ds1302_settime();
	LCD_ShowString(1,1,"  /  /   Day:");
	LCD_ShowString(2,1,"  :  :");
	
	
	while(1)
	{
		ds1302_readtime();
		LCD_ShowNum(1,1,ds1302_time[0],2);
		LCD_ShowNum(1,4,ds1302_time[1],2);
		LCD_ShowNum(1,7,ds1302_time[2],2);
		LCD_ShowNum(1,14,ds1302_time[6],2);
		LCD_ShowNum(2,1,ds1302_time[3],2);
		LCD_ShowNum(2,4,ds1302_time[4],2);
		LCD_ShowNum(2,7,ds1302_time[5],2);
	}

}